<?php

use think\migration\Migrator;
use think\migration\db\Column;

class TableTeamAddShareId extends Migrator
{
    public function up()
    {
        $this->table('team')
            ->addColumn(Column::integer('share_id', 20)->setComment('分享id')->setNullable())
            ->addIndex('share_id')
            ->update();
    }

    public function down()
    {
        $this->table('team')->removeColumn('share_id')->removeIndex('share_id');
    }
}
